home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 22
/
022.d81
/
any printer
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
5KB
|
203 lines
1 printchr$(147)chr$(5):poke53281,0:forx=0to5:print:next
2 printtab(13)"any printer/64"
3 print:printtab(17)"*1984*":print:printtab(13)"gary v. fields"
4 forx=0to3000:next
15 clr:open15,8,15
16 u$=chr$(145):rt$=chr$(18):ls$=" "
17 ro$=chr$(146):wt$=chr$(5):rd$=chr$(28):n$=chr$(0)
20 poke53280,0
22 goto 700
25 printrt$rd$"disk display"wt$
26 print:close1,8,0:open1,8,0,"$0":a=0:gosub 60
27 ifd2$<>"ok"thenclose1
28 get#1,a$,a$
29 f$="":b=0:get#1,a$,a$
31 ifa$=""thenclose1:printrt$" end directory "wt$
32 ifa$=""then forx=0to14-a:printls$:nextx:gosub50:return
34 get#1,a$
35 ifa$=""thena=a+1:goto40
36 ifa$=chr$(34)thenb=1:a$=""
37 ifb=1thenf$=f$+a$
38 iflen(f$)>19thenprintf$:goto29
39 goto34
40 ifa<14then29
41 printrt$" file found? (y/n) "wt$:poke198,0
42 getq$:ifq$=""then42
43 printu$u$:printls$
44 ifq$="y"thena$="":goto31
45 printu$u$:printls$chr$(19):print:print:print:a=0:goto29
50 printchr$(19):forx=0to17:print:next:return
60 input#15,d1,d2$,d3,d4:return
200 ifa=32thena$=" ":return
201 ifa=17thena$="[crsr d]":return
202 ifa=29thena$="[crsr r]":return
203 ifa=145thena$="[crsr u]":return
204 ifa=147thena$="[clr/home]":return
205 ifa=157thena$="[crsr l]":return
206 ifa=19thena$="[home]":return
207 ifft$="s"anda=13thenprint#1:return
208 ifa=13thena$="[return]":return
209 ifa=14thena$="[lower case]":return
210 ifa=5thena$="[white]":return
211 ifa=18thena$="[rev on]":return
212 ifa=20thena$="[del]":return
213 ifa=28thena$="[red]":return
214 ifa=30thena$="[green]":return
215 ifa=31thena$="[blue]":return
216 ifa=141thena$="[shft return]":return
217 ifa=142thena$="[upper case]":return
218 ifa=144thena$="[black]":return
219 ifa=146thena$="[rev off]":return
220 ifa=148thena$="[inst]":return
221 ifa=156thena$="[pur]":return
222 ifa=158thena$="[yel]":return
223 ifa=159thena$="[cyn]":return
224 ifa=255thena$="[pi]":return
225 ifa=133thena$="[f1]":return
226 ifa=134thena$="[f3]":return
227 ifa=135thena$="[f5]":return
228 ifa=136thena$="[f7]":return
229 ifa=137thena$="[f2]":return
230 ifa=138thena$="[f4]":return
231 ifa=139thena$="[f6]":return
232 ifa=140thena$="[f8]":return
233 ifa=160thena$=" ":return
234 ifa=151thena$="[grey 1]":return
235 ifa=152thena$="[grey 2]":return
236 ifa=155thena$="[grey 3]":return
237 ifa=129thena$="[orange]":return
238 ifa=150thena$="[lt red]":return
239 ifa=153thena$="[lt green]":return
240 ifa=154thena$="[lt blue]":return
241 ifa=149thena$="[brown]":return
250 x$=str$(a):x$=mid$(x$,2,3):a$="[chr$("+x$+")]":return
300 ifa=153thena$="print":return
301 ifa=151thena$="poke":return
302 ifa=152thena$="print#":return
303 ifa=129thena$="for":return
304 ifa=131thena$="data":return
305 ifa=137thena$="goto":return
306 ifa=139thena$="if":return
307 ifa=141thena$="gosub":return
308 ifa=142thena$="return":return
309 ifa=163thena$="tab(":return
310 ifa=164thena$="to":return
311 ifa=175thena$="and":return
312 ifa=176thena$="or":return
313 ifa=199thena$="chr$":return
314 ifa=140thena$="restore":return
315 ifa=170thena$="+":return
316 ifa=171thena$="-":return
317 ifa=172thena$="*":return
318 ifa=173thena$="/":return
319 ifa=174thena$="^":return
320 ifa=177thena$=">":return
321 ifa=178thena$="=":return
322 ifa=179thena$="<":return
323 ifa=194thena$="peek":return
324 ifa=167thena$="then":return
325 ifa=133thena$="input":return
326 ifa=132thena$="input#":return
327 ifa=143thena$="rem":return
328 ifa=159thena$="open":return
329 ifa=160thena$="close":return
330 ifa=169thena$="step":return
331 ifa=201thena$="right$":return
332 ifa=147thena$="load":return
333 ifa=203thena$="go":return
340 ifa=128thena$="end":return
341 ifa=130thena$="next":return
342 ifa=134thena$="dim":return
343 ifa=135thena$="read":return
345 ifa=138thena$="run":return
346 ifa=144thena$="stop":return
347 ifa=145thena$="on":return
348 ifa=148thena$="save":return
349 ifa=149thena$="verify":return
350 ifa=150thena$="def":return
351 ifa=154thena$="cont":return
352 ifa=155thena$="list":return
353 ifa=156thena$="clr":return
354 ifa=157thena$="cmd":return
355 ifa=197thena$="val":return
356 ifa=161thena$="get":return
357 ifa=165thena$="fn":return
358 ifa=166thena$="spc(":return
359 ifa=168thena$="not":return
360 ifa=180thena$="sgn":return
361 ifa=181thena$="int":return
362 ifa=182thena$="abs":return
363 ifa=183thena$="usr":return
364 ifa=184thena$="fre":return
365 ifa=185thena$="pos":return
366 ifa=186thena$="sqr":return
367 ifa=187thena$="rnd":return
368 ifa=188thena$="log":return
369 ifa=189thena$="exp":return
370 ifa=190thena$="cos":return
371 ifa=191thena$="sin":return
372 ifa=192thena$="tan":return
373 ifa=193thena$="atn":return
374 ifa=195thena$="len":return
375 ifa=196thena$="str$":return
376 ifa=158thena$="sys":return
377 ifa=198thena$="asc":return
378 ifa=200thena$="left$":return
379 ifa=202thena$="mid$":return
380 ifa=146thena$="wait":return
381 ifa=162thena$="new":return
382 ifa=136thena$="let":return
383 ifa=255thena$="[pi]":return
390 x$=str$(a):x$=mid$(x$,2,3):a$="chr$("+x$+")":return
700 printchr$(147):print:print:print
710 print:print
720 dd$="":input"view the disk direcory (y/n)";dd$
722 ifdd$="y"thenprintchr$(147):gosub25:a=0
730 nf$="":input"name file";nf$
732 iflen(nf$)<1orlen(nf$)>16thenprintu$u$:goto730
740 ft$="":print"file type: "rt$"p"ro$"rg or "rt$"s"ro$"eq";:inputft$
742 ifft$<>"p"thenifft$<>"s"thenprintu$u$:goto740
750 fd$="":print"print to "rt$"s"ro$"creen or "rt$"p"ro$"rinter";:inputfd$
752 iffd$<>"s"theniffd$<>"p"thenprintu$u$:goto750
754 iffd$="s"thenfd=3
756 iffd$="p"thenfd=4
760 sk=0:print"# bytes to skip "rt$"<return>"ro$" = none":inputsk
800 printchr$(147):forx=0to4:print
810 printrt$" searching for: "nf$" ,"ft$
830 iffd=3thenty$="screen"
835 iffd=4thenty$="printer"
840 printtab(3)"display on: "ty$
845 printtab(5)rt$" < f1 to abort> "
850 close8:open8,8,8,"0:"+nf$+","+ft$+",r"
852 ifsk>0thenforx=0tosk:get#8,a$:next:x=0
855 close1:open1,fd
856 print#1,nf$
860 gosub60:ifa>0thenprintchr$(147)d1;d2$,d3;d4:goto1000
865 ifft$="p"thenget#8,a$,b$
870 ifft$="p"thenget#8,a$,b$
874 ifft$="s"then905
875 get#8,c$,d$:f1=asc(c$+n$):f2=asc(d$+n$)
880 ifst=0thenprint#1,(f2*256)+f1;
890 get#8,a$:a=asc(a$+n$):ifa>0thenc=0
891 getbk$:ifbk$=chr$(133)thengoto1000
892 ifa=0thenfl=0:print#1:c=c+1:goto870
893 ifst=0then900
895 ifst=64then1000
896 print"status: "st:goto1000
900 iffl=0anda=34thenfl=1:goto905
901 iffl=1anda>93thengosub200:goto910
902 ifa=34 thenfl=0
903 ifa<33thengosub200:goto910
904 ifa>93thengosub300:goto910
905 print#1,chr$(a);:a=0:goto890
910 print#1,a$;:goto890
1000 print#1:gosub60
1001 printchr$(5):close1:close8:close15
1010 ifd1>0thenprint"error-"
1011 print"disk status:"d1;d2$,d3;d4
1015 print:print" 1. ==> try again":print" 2. ==> return to loadstar"
1017 print"which ?"
1020 poke198,0:wait198,1:getq$:ifq$<>"1"andq$<>"2"then1020
1030 ifq$="1"thenclr:goto15
1040 load"hello connect",8